﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />


<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>

</head>

<body class="ihg-theme-draft">

  <%@ include file="/WEB-INF/include/header.jsp"%>
  <%@ include file="/WEB-INF/include/submenu.jsp"%>

  <div class="container-fluid ihg-container has-ihg-sidemenu">

    <div class="ihg-breadcrumb">
      <ol class="breadcrumb border-breadcrumb">
        <li class="active">Administrator Mgnt</li>
      </ol>
    </div>

    <div class="ihg-content-layout has-operation">

      <div class="ihg-operation-bar no-margin no-bottom-border no-border clearfix">
        <div class="ihg-operation-group pull-right">
          <a href="${ctx.host}/administrators/create" class="btn btn-default btn-shadow btn-shadow-default" data-target="#create" data-toggle="modal">Add</a> <a href="${ctx.host}/administrators/search" class="btn btn-success btn-shadow btn-shadow-success" data-target="#search" data-toggle="modal">Search</a>
        </div>
      </div>

      <table class="table table-hover ihg-table tab-pane table-striped">
        <thead>
          <tr>
            <th>NAME</th>
            <th>EMAIL</th>
            <th>TELEPHONE</th>
            <th>LAST UPDATE TIME</th>
            <th class="text-center">OPT</th>
          </tr>
        </thead>
        
        <tbody>
          <c:forEach items="${administrators}" var="administrator">
            <tr>
              <td>${administrator.name}</td>
              <td>${administrator.email}</td>
              <td>${administrator.telephone}</td>
              <td>${administrator.lastModifyTime}</td>
              <td class="text-center">
                <a href="${ctx.host}/administrators/${administrator.id}/edit" data-target="#edit" data-toggle="modal">Edit</a>&nbsp;&nbsp; 
                <a href="${ctx.host}/administrators/${administrator.id}/delete" data-target="#delete" data-toggle="modal">Delete</a>&nbsp;&nbsp; 
                <a href="${ctx.host}/administrators/${administrator.id}">Detail</a>&nbsp;&nbsp;
              </td>
            </tr>
          </c:forEach>
        </tbody>
        
        <tfoot>
          <tr>
            <td colspan="6">
              <div class="pull-left">
                <jsp:include page="/WEB-INF/include/page.jsp">
                  <jsp:param name="url" value="${ctx.host}/administrators" />
                  <jsp:param name="queryString" value="${queryString}" />
                </jsp:include>
              </div>
            </td>
          </tr>
        </tfoot>
      </table>
    </div>

  </div>

  <%@ include file="/WEB-INF/include/footer.jsp"%>
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource root="${ctx.resource}/build" type="script" src="js/page/account/administrator/administrator-list.js" />
  <script type="text/javascript">
    require([ 'page/account/administrator/administrator-list' ], function (page) {
      page.init();
    })
  </script>

</body>
</html>